<?xml version="1.0" encoding="utf-8" ?>
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.org/ui"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:com="http://java.sun.com/jsf/composite/componentes">
       
<ui:composition template="/templates/layout.xhtml">

	<link href='#{request.contextPath}/resources/img/logo-icon.ico' rel='shortcut icon'/>

    <h:outputStylesheet library="css" name="login.css" />
    
    <h:form id="formLogin">
        <p:panel header="#{messages['login.titulo']}" styleClass="login-panel">
            <p:messages globalOnly="true" />
        
            <com:formInput id="username" label="#{messages['login.login']}">
                <p:inputText id="input" label="#{messages['login.login']}" required="true" value="#{credentials.username}" />
            </com:formInput>
            
            <com:formInput id="password" label="#{messages['login.senha']}">
                <p:password
                    id="input"
                    label="#{messages['login.senha']}"
                    required="true"
                    value="#{credentials.password}"
                    feedback="false"
                    converter="br.senai.sc.hidroData.HashConverter" />
            </com:formInput>
            
            <f:facet name="footer">
                <p:commandButton id="logar" action="#{identity.login()}" value="#{messages['login.submit']}" update="@form" />
            </f:facet>
        </p:panel>
    </h:form>
</ui:composition>
</html>